all: clean osxclean wtq.jar server.jar editor.jar host.jar contestant.jar audience.jar testhost.jar testcontestant.jar testaudience.jar

clean:
	rm -f *.jar

osxclean:
	export COPYFILE_DISABLE=true
	rm -f src/.DS_Store
	rm -f src/*/.DS_Store
	rm -f src/*/*/.DS_Store
	rm -f src/*/*/*/.DS_Store
	rm -f src/*/*/*/*/.DS_Store
	rm -f src/*/*/*/*/*/.DS_Store
	rm -f src/*/*/*/*/*/*/.DS_Store
	rm -f src/*/*/*/*/*/*/*/.DS_Store
	rm -f src/*/*/*/*/*/*/*/*/.DS_Store
	rm -f bin/.DS_Store
	rm -f bin/*/.DS_Store
	rm -f bin/*/*/.DS_Store
	rm -f bin/*/*/*/.DS_Store
	rm -f bin/*/*/*/*/.DS_Store
	rm -f bin/*/*/*/*/*/.DS_Store
	rm -f bin/*/*/*/*/*/*/.DS_Store
	rm -f bin/*/*/*/*/*/*/*/.DS_Store
	rm -f bin/*/*/*/*/*/*/*/*/.DS_Store

wtq.jar: osxclean
	jar cmf Manifest/wtq.mf wtq.jar \
		-C bin edu/sfsu/powerrangers/jeopardy/GeneralClient.class \
		-C bin edu/sfsu/powerrangers/jeopardy/GeneralServer.class \
		-C bin edu/sfsu/powerrangers/jeopardy/HostClient.class \
		-C bin edu/sfsu/powerrangers/jeopardy/HostServer.class \
		-C bin edu/sfsu/powerrangers/jeopardy/ContestantClient.class \
		-C bin edu/sfsu/powerrangers/jeopardy/ContestantServer.class \
		-C bin edu/sfsu/powerrangers/jeopardy/AudienceClient.class \
		-C bin edu/sfsu/powerrangers/jeopardy/AudienceServer.class \
		-C bin edu/sfsu/powerrangers/jeopardy/gamestate

server.jar: osxclean
	jar cmf Manifest/server.mf server.jar -C bin edu/sfsu/powerrangers/jeopardy/server

editor.jar: osxclean
	jar cmf Manifest/editor.mf editor.jar -C bin edu/sfsu/powerrangers/jeopardy/editor

host.jar: osxclean
	jar cmf Manifest/host.mf host.jar -C bin edu/sfsu/powerrangers/jeopardy/host

contestant.jar: osxclean
	jar cmf Manifest/contestant.mf contestant.jar -C bin edu/sfsu/powerrangers/jeopardy/contestant

audience.jar: osxclean
	jar cmf Manifest/audience.mf audience.jar -C bin edu/sfsu/powerrangers/jeopardy/audience

testhost.jar: osxclean
	jar cmf Manifest/testhost.mf testhost.jar -C bin edu/sfsu/powerrangers/jeopardy/test/TestHost.class

testcontestant.jar: osxclean
	jar cmf Manifest/testcontestant.mf testcontestant.jar -C bin edu/sfsu/powerrangers/jeopardy/test/TestContestant.class

testaudience.jar: osxclean
	jar cmf Manifest/testaudience.mf testaudience.jar -C bin edu/sfsu/powerrangers/jeopardy/test/TestAudience.class

.PHONY: all eclipseall clean eclipseclean osxclean
